Did you manage to display the client id with the first widget?
Note that I made it so this widget is sent only once to each client since this value does not change for the duration of a match. See the relevant bit of code:
if (!local.player.has_client_id_displayed) { local.player.has_client_id_displayed = 1;
I strongly recommend everyone to do this when dealing with globalwidgetcommand, huddraw or ihuddraw. Only update if there is something to update. Not doing so will bloat packets sent of the network, causing them to be split up in more packets, meaning there's more traffic and more chance that a packet will be lost, meaning the server has to resend those lost packets, meaning more traffic etc...
Anyway, I'm not at my home computer but I believe you only need to stufftext the cvar again to update the display of the widget. I'll elaborate on this further when I get home.
Don't forget to set up the rect, alignment and other properties of your widgets. I just pulled those snippets from my old mods and from some other mod. Play with it until it suits your needs.


Reply With Quote